home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / initScriptedPanels.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  10.6 KB  |  341 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. {
  19.         if (`isTrue AnimationExists`) {
  20.                                    
  21.             if (!`scriptedPanelType -exists dopeSheetPanel`) {
  22.                 //
  23.                 //  Define the callbacks for the dopeSheetPanel
  24.                 //
  25.                 scriptedPanelType
  26. //                    -sourceFile            "dopeSheetPanel"
  27.                     -createCallback        "createDopeSheetPanel" 
  28.                     -addCallback        "addDopeSheetPanel"
  29.                     -removeCallback        "removeDopeSheetPanel"
  30.                     -deleteCallback        "deleteDopeSheetPanel"
  31.                     -saveStateCallback    "saveStateDopeSheetPanel"
  32.                     dopeSheetPanel;
  33.  
  34.                 source    "dopeSheetPanel";
  35.  
  36.             }
  37.                                    
  38.             if (!`scriptedPanelType -exists clipEditorPanel`) {
  39.                 //
  40.                 //  Define the callbacks for the clipEditorPanel
  41.                 //
  42.                 scriptedPanelType
  43.                     -createCallback        "createClipEditorPanel" 
  44.                     -addCallback        "addClipEditorPanel"
  45.                     -removeCallback        "removeClipEditorPanel"
  46.                     -deleteCallback        "deleteClipEditorPanel"
  47.                     -saveStateCallback    "saveStateClipEditorPanel"
  48.                     clipEditorPanel;
  49.  
  50.                 source    "clipEditorPanel";
  51.             }
  52.             
  53.             if (!`scriptedPanelType -exists graphEditor`) {
  54.                 //
  55.                 //  Define the callbacks for the graphEditor
  56.                 //
  57.                 scriptedPanelType
  58. //                    -sourceFile            "graphEditorPanel"
  59.                     -createCallback        "createGraphEditor" 
  60.                     -addCallback        "addGraphEditor"
  61.                     -removeCallback        "removeGraphEditor"
  62.                     -deleteCallback        "deleteGraphEditor"
  63.                     -saveStateCallback    "saveStateGraphEditor"
  64.                     graphEditor;
  65.  
  66.                 source    "graphEditorPanel";
  67.             }
  68.                                    
  69.             if (!`scriptedPanelType -exists setEditor`) {
  70.                 //
  71.                 //  Define the callbacks for the setEditor
  72.                 //
  73.                 scriptedPanelType
  74. //                    -sourceFile            "setEditorPanel"
  75.                     -createCallback        "createSetEditor" 
  76.                     -addCallback        "addSetEditor"
  77.                     -removeCallback        "removeSetEditor"
  78.                     -deleteCallback        "deleteSetEditor"
  79.                     -saveStateCallback    "saveStateSetEditor"
  80.                     setEditor;
  81.  
  82.                 source    "setEditorPanel";
  83.             }
  84.  
  85.             if (!`scriptedPanelType -exists rendRelPanel`) {
  86.                 //
  87.                 //  Define the callbacks for the rendering
  88.                 //     relationship panel
  89.                 //
  90.                 scriptedPanelType
  91.                         -createCallback     "createRendRelPanel"        
  92.                         -addCallback         "addRendRelPanel"
  93.                         -removeCallback     "removeRendRelPanel"
  94.                         -deleteCallback     "deleteRendRelPanel"
  95.                         -saveStateCallback     "saveStateRendRelPanel"
  96.                   rendRelPanel;
  97.  
  98.                 source    "rendRelPanel";
  99.             }
  100.  
  101.             if (!`scriptedPanelType -exists componentEditorPanel`) {
  102.                 scriptedPanelType
  103.                     -createCallback        "createComponentEditorPanel" 
  104.                     -initCallback "initComponentEditorPanel"
  105.                     -addCallback        "addComponentEditorPanel"
  106.                     -removeCallback        "removeComponentEditorPanel" 
  107.                     -saveStateCallback    "saveComponentEditorPanel"
  108.                     componentEditorPanel;
  109.  
  110.                 source    "componentEditorPanel";
  111.             }
  112.  
  113.         }
  114.  
  115.         if (`isTrue MayaCreatorExists`) {
  116.             if (!`scriptedPanelType -exists dynPaintScriptedPanelType`) {
  117.                 if ( !`exists dynPaintCreateCallback` ) {
  118.                     // Make sure that the script is loaded
  119.                     //
  120.                     source dynPaintPanel;
  121.                 }
  122.  
  123.                 // This is duplicated from dynPaintPanel.mel
  124.                 scriptedPanelType
  125.                     -createCallback    "dynPaintCreateCallback"
  126.                     -initCallback      "dynPaintInitCallback" 
  127.                     -addCallback       "dynPaintAddCallback"
  128.                     -removeCallback    "dynPaintRemoveCallback"
  129.                     -deleteCallback    "dynPaintDeleteCallback"
  130.                     -saveStateCallback "dynPaintSaveStateCallback"
  131.                     -unique true
  132.                     dynPaintScriptedPanelType;
  133.             }
  134.         }
  135.                            
  136.         if (`exists hyperGraph`) {
  137.             if (!`scriptedPanelType -exists hyperGraphPanel`) {
  138.                 //
  139.                 //  Define the callbacks for the fullGraphPanel
  140.                 //
  141.                 scriptedPanelType
  142.                     -createCallback        "createHyperGraphPanel" 
  143.                     -initCallback        "initHyperGraphPanel" 
  144.                     -addCallback        "addHyperGraphPanel"
  145.                     -removeCallback        "removeHyperGraphPanel"
  146.                     -deleteCallback        "deleteHyperGraphPanel"
  147.                     -saveStateCallback    "saveStateHyperGraphPanel"
  148.                     hyperGraphPanel;
  149.  
  150.                 source    "hyperGraphPanel";
  151.             }
  152.  
  153.             if (!`scriptedPanelType -exists hyperShadePanel`) 
  154.             {
  155.                 //
  156.                 //  Define the callbacks for the shader editor panel.
  157.                 //
  158.                 scriptedPanelType
  159.                     -createCallback        "createHyperShadePanel" 
  160.                     -initCallback        "initHyperShadePanel"
  161.                     -addCallback        "addHyperShadePanel"
  162.                     -removeCallback        "removeHyperShadePanel"
  163.                     -saveStateCallback    "saveStateHyperShadePanel"
  164.                     -deleteCallback        "deleteHyperShadePanel"
  165.                     -unique true
  166.                     hyperShadePanel;
  167.                     
  168.                 source "hyperShadePanel";
  169.             }
  170.  
  171.             if (!`scriptedPanelType -exists visorPanel`) {
  172.                 //
  173.                 //  Define the callbacks for the fullGraphPanel
  174.                 //
  175.                 scriptedPanelType
  176.                     -createCallback        "createVisorPanel" 
  177.                     -addCallback        "addVisorPanel"
  178.                     -initCallback        "initVisorPanel" 
  179.                     -removeCallback        "removeVisorPanel"
  180.                     -deleteCallback        "deleteVisorPanel"
  181.                     -saveStateCallback    "saveStateVisorPanel"
  182.                     -unique true
  183.                     visorPanel;
  184.  
  185.                 source    "visorPanel";
  186.             }
  187.         }
  188.                                    
  189.         if (`isTrue "PolygonsExists"`) {
  190.             if (!`scriptedPanelType -exists polySelectionConstraintPanel`) {
  191.                 scriptedPanelType
  192.                     -unique true
  193. //                    -createCallback        "createPolySelConstraintWindow" 
  194.                     -addCallback        "addPolySelConstraintWindow" 
  195.                     -removeCallback        "removePolySelConstraintWindow" 
  196.                     polySelectionConstraintPanel;
  197.  
  198.                 source    "polySelConstraintPanel";
  199.             }
  200.             if (`isTrue "PolyTextureExists"`) {
  201.                 if (!`scriptedPanelType -exists polyTexturePlacementPanel`) {
  202.                     scriptedPanelType
  203.                         -unique true
  204. //                        -sourceFile            "texturePanel"
  205.                         -createCallback        "createTextureWindow" 
  206.                         -addCallback        "addTextureWindow" 
  207.                         -removeCallback        "removeTextureWindow" 
  208.                         polyTexturePlacementPanel;
  209.  
  210.                     source    "texturePanel";
  211.                 }
  212.             }
  213.         }
  214.                                                                                                                                                                                                   
  215.         // Rendering Panel
  216.         if (`isTrue "RenderingExists"`) {
  217.             if (!`scriptedPanelType -exists multiListerPanel`) {
  218.                 scriptedPanelType
  219. //                    -sourceFile            "multiListerPanel"
  220.                     -createCallback        "createMultiListerPanel" 
  221.                     -initCallback "initMultiListerPanel"
  222.                     -addCallback        "addMultiListerPanel"
  223.                     -removeCallback        "removeMultiListerPanel" 
  224.                     -saveStateCallback    "saveMultiListerPanel"
  225.                     multiListerPanel;
  226.  
  227.                 source    "multiListerPanel";
  228.             }
  229.  
  230.             if (!`scriptedPanelType -exists renderWindowPanel`) {
  231.                 scriptedPanelType
  232.                     -unique true
  233. //                    -sourceFile            "renderWindowPanel"
  234.                     -createCallback        "createRenderWindowPanel" 
  235.                     -addCallback        "addRenderWindowPanel" 
  236.                     -removeCallback        "removeRenderWindowPanel" 
  237.                     renderWindowPanel;
  238.  
  239.                 source    "renderWindowPanel";
  240.             }
  241.             
  242.             if (!`scriptedPanelType -exists shadingGroupEditor`) {
  243.             //
  244.             //  Define the callbacks for the shadinGroupEditor (a variant of set editor)
  245.             //
  246.                 scriptedPanelType
  247.                     -unique true
  248. //                    -sourceFile        "ShadingGroupEditorPanel"
  249.                     -createCallback    "createShadingGroupEditor" 
  250.                     -addCallback        "addShadingGroupEditor"
  251.                     -removeCallback    "removeShadingGroupEditor"
  252.                     -deleteCallback    "deleteShadingGroupEditor"
  253.                     -saveStateCallback    "saveStateShadingGroupEditor"
  254.                     shadingGroupEditor;
  255.  
  256.                 source    "ShadingGroupEditorPanel";
  257.             }
  258.         }
  259.  
  260.         if (`isTrue "DynamicsExists"`) {
  261.             if (! `scriptedPanelType -exists dynRelEdPanel`) {
  262.                 scriptedPanelType 
  263.     //                -sourceFile            "dynRelEditorPane"
  264.                     -createCallback        "createDynREPanel"
  265.                     -addCallback        "addDynREPanel" 
  266.                     -removeCallback        "removeDynREPanel"
  267.                     dynRelEdPanel;
  268.  
  269.                 eval( "source \"dynRelEditorPane\"" );
  270.             }
  271.         }
  272.  
  273.         // Register the relationship editor. The relationship editor is a
  274.         // generic editor which will perform tasks like light linking,
  275.         // dynamics relationships, attribute connection.
  276.         // Since the relationship editor is generic, it needs to be registered
  277.         // regardless of what modules are present. Checking whether a
  278.         // particular task of the relationship editor can be performed given
  279.         // the available modules must be done in the relationship editor
  280.         // itself.
  281.         //
  282.         if (!`scriptedPanelType -exists relationshipPanel`) 
  283.         {
  284.             //
  285.             //  Define the callbacks for the relationship panel.
  286.             //
  287.             scriptedPanelType
  288.                 -createCallback        "createRelationshipPanel" 
  289.                 -initCallback        "initRelationshipPanel"
  290.                 -addCallback        "addRelationshipPanel"
  291.                 -removeCallback        "removeRelationshipPanel"
  292.                 -saveStateCallback    "saveStateRelationshipPanel"
  293.                 -deleteCallback        "deleteRelationshipPanel"
  294.                 relationshipPanel;
  295.                 
  296.             eval( "source \"relationshipEditor\"" );
  297.         }
  298.  
  299.         if (!`scriptedPanelType -exists referenceEditorPanel`) {
  300.             scriptedPanelType
  301.                 -unique         true
  302. //                -sourceFile        "referenceEditorPanel"
  303.                 -createCallback    "createRefEdPanel"
  304.                 -addCallback    "addRefEdPanel"
  305.                 -removeCallback    "removeRefEdPanel"
  306.                 referenceEditorPanel;
  307.             
  308.             eval( "source \"referenceEditorPanel\"" );
  309.         }
  310.  
  311.                                    
  312.             if (!`scriptedPanelType -exists componentEditorPanel`) {
  313.                 //
  314.                 //  Define the callbacks for the componentEditorPanel
  315.                 //
  316.                 scriptedPanelType
  317.                     -createCallback        "createComponentEditorPanel" 
  318.                     -addCallback        "addComponentEditorPanel"
  319.                     -removeCallback        "removeComponentEditorPanel"
  320.                     -deleteCallback        "deleteComponentEditorPanel"
  321.                     -saveStateCallback    "saveStateComponentEditorPanel"
  322.                     componentEditorPanel;
  323.  
  324.                 eval( "source \"componentEditorPanel\"" );
  325.             }
  326.  
  327.  
  328. //        if (`about -nt`) {
  329. //            if (!`scriptedPanelType -exists helpPanel`) {
  330. //                scriptedPanelType
  331. //                    -createCallback        "createHelpPanel" 
  332. //                    -addCallback        "addHelpPanel"
  333. //                    -removeCallback        "removeHelpPanel"
  334. //                    -deleteCallback        "deleteHelpPanel"
  335. //                    -saveStateCallback    "saveStateHelpPanel"
  336. //                    helpPanel;
  337. //            }
  338. //            source "helpPanel";
  339. //        }
  340. }
  341.